<script>on mouseUpglobal xword-- ask "Search for text:"put Line 1 of card field "SearchStr" into xwordif xword is empty thenanswer "Please enter search words above."exit mouseUpelseset cursor to busy-- put xwordget SWSearch( "WFB 1996:WFB96.sws", xword )put it into cd field "tres"end ifput empty into card field "Search"if it is empty thenanswer "Sorry the word or words " & xword && "were not found."elseput the second character of it into xItif (xIt < "0" or xIt > "9") thenanswer itelserepeat with CurrentLine = 1 to number of lines in card field "tres"put Line CurrentLine of card field tres & RETURN into NAMEput character 9 to 100 of NAME after last character of card field "Search"end repeatend ifend ifset cursor to arrowend mouseUp</script>
</part>
<part>
<id>123</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>405</left>
<top>141</top>
<right>417</right>
<bottom>153</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>build letters</name>
<script>on mouseUpput "abcdefghijklmnopqrstuvwxyz" into lettersrepeat with k = 1 to 1--put char k to k of letters into xnameput "s" into xnameput "Macintosh HD:GN:gn words:" & xname into fpathopen file fpathread from file fpath for 30000put it into cd field xnameclose file fpathend repeatend mouseUp</script>
</part>
<part>
<id>75</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <true /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>491</left>
<top>7</top>
<right>637</right>
<bottom>125</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>tres</name>
<script></script>
</part>
<part>
<id>76</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <true /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>13</left>
<top>136</top>
<right>439</right>
<bottom>400</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<selectedLines>
<integer>2</integer>
</selectedLines>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>Search</name>
<script>on mouseDownglobal xwordselect the clickLinewait until the mouse is upif the mouseLoc is not within rect of me thenselect emptyexit mouseDownend ifput word 2 of the clickLine into theLine-- put theLineput Line theLine of card field tres into CardNXput character 1 to 8 of CardNX into CardN-- put CardNif CardN is empty then-- put "EMPTY"elseput 1 into searchYesif " or " is in card field "SearchStr" then-- answer "OR"put 0 into searchYesend ifWTIgotoWFBPage CardNput the first word of xword into xx-- find word xx in cd field "bigText" of this card-- if not an -OR--- put searchYesif searchYes is 1 thenfind xxend ifend if--Put the Result & " [" & PICT &"]"end mouseDown</script>
</part>
<part>
<id>79</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>14</left>
<top>90</top>
<right>473</right>
<bottom>111</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>SearchStr</name>
<script>on keyDown whichKeyglobal lastInsertput the selectedChunk into xif the last word of x is "3" thenput word 4 of x into lastInsertend ifpass keyDownend keyDown</script>
</part>
<part>
<id>80</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>46</left>
<top>41</top>
<right>452</right>
<bottom>87</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>36</textSize>
<textStyle>plain</textStyle>
<textHeight>48</textHeight>
<name>Loading</name>
<script></script>
</part>
<part>
<id>81</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>447</left>
<top>136</top>
<right>626</right>
<bottom>400</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <true /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<selectedLines>
<integer>1</integer>
</selectedLines>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>a</name>
<script>on mouseUpmouseUpListend mouseUp</script>
</part>
<part>
<id>82</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>3</left>
<top>441</top>
<right>111</right>
<bottom>477</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>New Button</name>
<script>on mouseUpgo to card 1 of stack "Guinness:mac:Credits"end mouseUp</script>
<script>on openCardglobal lastWordsglobal isLoadedglobal lastLetterhide cd field lastLetterput "a" into lastLettershow cd field lastLetterput cd field "SearchStr" into lastWord-- put empty into card field "Search Progress"send colorme to this cardput cantModify of this stack into xTESTif xTEST is true thenanswer "The search function requires you to copy files to your HD."elseif isLoaded is 0 thenshow cd field "Loading"send colorme to this cardget SWSearch( "WFB 1996:WFB96.sws", "aaaa" )put 1 into isLoadedhide cd field "Loading"send colorme to this cardend ifkeyDown(tab)put cd field "SearchStr" into lastWord-- keyDown(tab)-- pass openCardend ifend openCard-- on keyDown whichKey-- global lastWords-- global lastLetter-- if whichKey is return then-- send mouseUp to button "Find Text"-- else-- pass keyDown-- end if-- end keyDownon idleglobal lastWordsglobal lastLetter-- put the selectedChunkput cd field "SearchStr" into newWordsif newWords is not lastWords then-- answer "CHANGE!"put the selectedChunk into saveSel-- put lastWordsput compareStr( newWords, lastWords ) into xWord-- put xWordput newWords into lastWordsif xWord is empty thenexit idleend ifput character 1 to 1 of xWord into newLetif newLet is not lastLetter thenif (newLet >= "a") and (newLet <= "z") thenhide cd field lastLetterput newLet into lastLettershow cd field lastLetterend ifend if-- scroll down to wordput number of lines of cd field lastLetter into xEndput 1 into xStartput 1 into iterationsrepeat until( false )if iterations > 70 thenexit repeatend ifput xStart + ((xEnd-xStart) div 2) into xHalfif xHalf is xStart thenexit repeatend ifif xHalf is xEnd thenexit repeatend ifif line xHalf of cd field lastLetter > xWord thenput xHalf into xEndelseput xHalf into xStartend ifend repeatif line xHalf of cd field lastLetter is not xWord thenput xHalf + 1 into xHalfend if-- put line xHalf of cd field lastLetterselect line xHalf of cd field lastLetter-- select line xHalf of cd field lastLetter-- need to get focus back in cd field "SearchStr"-- keyDown(tab)select saveSel-- send openField( "cd field SearchStr" )end ifend idlefunction compareStr p1, p2-- answer "COMPARE" && p1 && p2put 1 into lastWput the number of characters of p1 into lP1 -- newput the number of characters of p2 into lP2 -- oldput 1 into kcput 0 into lastWrepeat until (kc>lP1)put character kc of p1 into test-- put test && " xchar"if lastW is 0 then -- maintain start of last wordput kc into lastWend ifif test is " " thenput 0 into lastWend ifif kc > IP2 then-- here is differenceexit repeatend ifif test is not character kc of p2 then-- here is differencerepeat until (kc>lP1)-- put test && " xxxxchar" && kc && lP1if character kc of p1 is " " thenexit repeatend ifput kc + 1 into kcend repeatexit repeatend ifput kc + 1 into kcend repeatput character lastW to kc-1 of p1 into diffWord-- put diffWordreturn diffWordend compareStron mouseUpListglobal lastInsertif the mouseLoc is not within rect of me thenselect emptyexit mouseUpListend ifput word 2 of the clickLine into theLineput word 6 of the clickLine into theField-- put "aaaa" into myClickLineput line theLine of cd field theField into myClickTextput lastInsert into lastInsertif lastInsert < 1 thenput 1 into lastInsertend ifput character lastInsert of cd field "SearchStr" into xcharif ( xchar is " " ) or (lastInsert <= 0 ) then-- put "XADD!!" && lastInsertput myClickText & " " after cd field "SearchStr"put the number of chars of cd field "SearchStr" into lastInsertelseput lastInsert into oldLastInsertput character lastInsert of cd field "SearchStr" into xCharrepeat while (lastInsert>=1) and (xChar is not " ")-- put xChar && "<===" && lastInsertput lastInsert - 1 into lastInsertput character lastInsert of cd field "SearchStr" into xCharend repeatif lastInsert > 1 thenput character 1 to lastInsert of cd field "SearchStr" into xelseput empty into xend ifput oldLastInsert + 1 into lastInsertput character lastInsert of cd field "SearchStr" into xCharput the number of characters of cd field "SearchStr" into maxCharsrepeat while (lastInsert<maxChars) and (xChar is not " ")-- put xChar && "<=" && lastInsertput lastInsert +1 into lastInsertput character lastInsert of cd field "SearchStr" into xCharend repeatif lastInsert < maxChars thenput character lastInsert to maxChars of cd field "SearchStr" into yelseput empty into yend ifput x & myClickText && y into cd field "SearchStr"put the number of chars of cd field "SearchStr" into lastInsertend ifend mouseUpList</script>
</card>
card_2864.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpgo to Card 4 of stack "WFB 1996:Mac:World Factbook 1996"end mouseUp</script>
</part>
<part>
<id>41</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>58</left>
<top>191</top>
<right>227</right>
<bottom>364</bottom>
</rect>
<style>oval</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>geoSearch</name>
<script>on mouseUpgo to Card 5 of stack "WFB 1996:Mac:World Factbook 1996"end mouseUp</script>
</part>
<part>
<id>42</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>326</left>
<top>33</top>
<right>495</right>
<bottom>206</bottom>
</rect>
<style>oval</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>MultiMedia</name>
<script>on mouseUpgo to Card 3 of stack "WFB 1996:Mac:World Factbook 1996"end mouseUp</script>
</part>
<part>
<id>43</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>147</left>
<top>34</top>
<right>316</right>
<bottom>207</bottom>
</rect>
<style>oval</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>credits</name>
<script>on mouseUpgo to Card 6 of stack "WFB 1996:Mac:World Factbook 1996"end mouseUp</script>
</part>
<name>Main</name>
<script>on closecardif there is a window "Image.19" then close window "Image.19"DisposeVideo -- in case one's left therepass CloseCardend closecardon opencardglobal movieIDglobal QToperational-- if QToperational is 1 then-- DisposeVideo -- in case one's already there-- QTMovie OpenMovie, Direct, "WFB_1993:MAPS:SpnGlobe.mov", ¬-- the topLeft of btn here, loop-- put the result into movieID-- if movieID is empty then-- -- ask "it is empty"-- put 0 into QToperational-- end if-- if "Error" is in movieID then-- if notifOnce is 0 then-- answer movieID-- put 1 into notifOnce-- end if-- put 0 into QToperational-- put empty into movieID-- end if-- end ifif QToperational is 0 then-- lock screen-- picture "WFB_1993:MAPS:globe:pict:image.19",file,rect,, "0,0",true-- set loc of window "image.19" to 0,0-- -- wait 30-- -- set rect of window "image.19" to "0,0,305,295"-- unlock screenend ifpass openCardend opencardfunction pictureClickanswer "OK"send mouseDown to button Hereend pictureClickon idleglobal movieIDif movieID is not empty and movieID is a number thenQTMovie Direct,movieID,Idleend ifend idleon DisposeVideoglobal movieID-- Direct movies only!-- This disposes of the movie but doesn't erase the screen-- so some may be confused by last frame seen still appearingif movieID is not empty and movieID is a number thenQTMovie Direct,movieID,Disposeput empty into movieIDend ifend DisposeVideo-- on CloseCard-- DisposeVideo-- show btn "then drag me"-- pass CloseCard-- end CloseCard-- on OpenCard-- global movieID-- put empty into movieID-- show btn "then drag me"-- pass openCard-- end OpenCard-- on mouseDown-- -- answer "OK iii"-- if the clickLoc is within the rect of btn "here" then-- send mouseDown to btn "here"-- end if-- end mouseDown-- on primeCard-- set rect of btn "then drag me" to 220,138,332,220-- set hilite of btn "mute movie" to false-- set hilite of btn "leave trail" to true-- pass primeCard-- end primeCard</script>